home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
misc
/
emu
/
ATUtilities.lha
/
ATUtilities
/
ASM
/
UMB.ASM
< prev
next >
Wrap
Assembly Source File
|
2000-09-29
|
3KB
|
211 lines
code segment
assume cs:code,ds:code
org 0
jIntNum equ 30
befehl equ 2
status equ 3
end_adr equ 14
cmd equ 16384
arg1 equ cmd+0
arg2 equ cmd+2
arg3 equ cmd+4
arg4 equ cmd+6
arg5 equ cmd+8
reg_bp equ 22
reg_sp equ 20
reg_ss equ 18
reg_cs equ 16
reg_es equ 14
reg_di equ 12
reg_ds equ 10
reg_si equ 8
reg_dx equ 6
reg_cx equ 4
reg_bx equ 2
reg_ax equ 0
reg_dl equ 6
reg_cl equ 4
reg_bl equ 2
reg_al equ 0
reg_dh equ 7
reg_ch equ 5
reg_bh equ 3
reg_ah equ 1
erst_b equ this byte
umbtreiber:
dw -1,-1 ; DOS-Intern
db 0,80h ; Flags
soffset dw offset strat ; Strategie-Routine
ioffset dw offset intr ; Interrupt-Routine
db "UMBXXXX0" ; UMB-Kennung
janus_ofs dw (?)
db_ptr dw (?),(?)
old_adr equ this dword
old_adr_ofs dw 0
old_adr_seg dw 0
old_int equ this dword
old_int_ofs dw 0
old_int_seg dw 0
; ************ Strategie-Routine des Treibers
strat proc far
mov cs:db_ptr,bx
mov cs:db_ptr+2,es
ret
strat endp
umb_handler proc far
pushf
jump_old_adr:
popf
jmp [cs:old_adr]
umb_handler_ende:
popf
ret
umb_handler endp
; ************ UMB-Interrupt fr Vektor $2F
new_int proc far
pushf
cmp ah,43h
jne jump_old_int
cmp al,10h
jne jump_old_int
mov bx,offset umb_handler
mov es,cs
popf
iret
jump_old_int:
popf
jmp [cs:old_int]
new_int endp
call_and_wait proc near
mov ah,7
mov al,jIntNum
int 0b
mov ah,8
mov al,jIntNum
int 0b
ret
call_and_wait endp
; ************ Interruptroutine des Treibers
intr proc far
push ax
push bx
push cx
push dx
push di
push si
push bp
push ds
push es
pushf
push cs
pop ds
les di,dword ptr db_ptr
mov bl,es:[di+befehl]
cmp bl,0
je bc_okay
mov ax,8003h
jmp short intr_end
bc_okay:
call init
intr_end label near
or ax,0100h
mov es:[di+status],ax
popf
pop es
pop ds
pop bp
pop si
pop di
pop dx
pop cx
pop bx
pop ax
ret
intr endp
init proc near
mov word ptr es:[di+end_adr],offset ende
mov word ptr es:[di+end_adr+2],cs
mov dx,offset initm
mov ah,9
int 21h
mov ah,43h
mov al,10h
int 2fh
mov old_adr_ofs,bx
mov old_adr_seg,es
mov ah,35h
mov al,2fh
int 21h
mov old_int_ofs,bx
mov old_int_seg,es
mov ah,25h
mov al,2fh
mov dx,offset new_int
int 21h
mov ah,1
mov al,jIntNum
int 0b
mov janus_ofs,di
mov dx,offset sokay
mov ah,9
int 21h
xor ax,ax
ret
init endp
; ************ Installationsmeldungen beim Start
initm db "ATUtilities UMB-Manager. Copyright (C) 1993 by Thomas. Dreibholz",13,10
db "All rights reserved worldwide.",13,10
db "ATUtilities is a part of the ATProject.",13,10
db "ATProject Copyright (C) 1992-1993 by MouseSoft Inc.",13,10,10,"$"
sokay db "Treiber wurde erfolgreich installiert.",13,10,"$"
kserv db "FEHLER: Amiga-Treiber ist nicht aktiv.",13,10
db "Treiber konnte nicht installiert werden.",13,10,10,"$"
ende equ this byte
code ends
end